package com.example.webmodule.convert;

import com.example.webmodule.entity.ApiPathVo;
import com.example.webmodule.entity.ServiceInfo;
import com.example.webmodule.model.ServiceInterface;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring")
public interface ServiceInterfaceConvert {
    ServiceInterfaceConvert INSTANCE = Mappers.getMapper(ServiceInterfaceConvert.class);

//    @Mapping(target = "status", constant = "UP")
    ServiceInterface toServiceInterface(ServiceInfo serviceInfo);

    ServiceInterface mergeVoToModel(
            ApiPathVo apiPathVo,
            @MappingTarget ServiceInterface serviceInterface);
}
